// 字体
@mixin mixin-font($size, $weight){
    font-size: #{$size}rem;
    font-weight: $weight;
}
// 背景色及图片
@mixin mixin-background-img($color, $name, $size) {
    background: $color url("@/assets/images/#{$name}") no-repeat center;
    background-size: $size;
}
// 图标
@mixin mixin-background-icon($color, $name, $size) {
    background: $color url("@/assets/icons/#{$name}") no-repeat center;
    background-size: $size;
}
// 伪类
@mixin mixin-before($width, $height){
    &::before{
        display: inline-block;
        content: "";
        width: $width;
        height: $height;
    }
}
@mixin mixin-after($width, $height){
    &::after{
        display: inline-block;
        content: "";
        width: $width;
        height: $height;
    }
}
// 清除浮动
@mixin mixin-clearfix{
    &::after{
        display: block;
        content: "";
        clear: both;
        visibility: hidden;
        height: 0;
    }
}
// 文字超出加省略号
@mixin mixin-text-ellipsis{
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
// 伸缩盒
@mixin mixin-flex($direction){
    display: flex;
    display: -moz-box;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    flex-direction: $direction;
}
// 定位 整屏 左上 左下 右上 右下
@mixin mixin-position-ltrb($type, $left, $top, $right, $bottom){
    position: $type;
    left: $left;
    top: $top;
    right: $right;
    bottom: $bottom;
}
@mixin mixin-position-lt($type, $left, $top){
    position: $type;
    left: $left;
    top: $top;
}
@mixin mixin-position-lb($type, $left, $bottom){
    position: $type;
    left: $left;
    bottom: $bottom;
}
@mixin mixin-position-rt($type, $right, $top){
    position: $type;
    right: $right;
    top: $top;
}
@mixin mixin-position-rb($type, $right, $bottom){
    position: $type;
    right: $right;
    bottom: $bottom;
}
// 各卡片区标题样式
@mixin mixin-wrap-title($align){
    line-height: 0.68rem;
    padding: 0 0.24rem;
    color: #fff;
    letter-spacing: 1px;
    text-align: $align;
    text-shadow: 0 2px 4px #fff;
    @include mixin-font(0.22, 400);
}
// 边框及圆角
@mixin mixin-border($color, $radius){
    border: 1px solid $color;
    border-radius: $radius;
}
